# 本任务要求编写程序，判断用户输入的4位整数是否是回文数。
# str_num = input()
# if str_num == str_num[::-1]:
#     print(f"{str_num} 是一个回文数。")
# else:
#     print(f"{str_num} 不是一个回文数。")
# import random
# from math import factorial

# account = {
#     "username": "admin",
#     "password": "1234"
# }
# username = input("请输入用户名：")
# password = input("请输入密码：")
# if username == account["username"] and password == account["password"]:
#     print("登陆成功")
# else:
#     print("登录失败，用户名或密码错误。")

# weight, district = input().split(",")
# # print(weight)
# # print(district)
# weight = float(weight)
# enc = {
#     "华北": "01",
#     "华东": "02",
#     "华南": "03",
# }
# if enc[district] == "01":
#     if weight <= 2:
#         result = 12
#     if weight > 2:
#         result = 12 + (weight - 2) * 2
# if enc[district] == "02":
#     if weight <= 2:
#         result = 13
#     if weight > 2:
#         result = 13 + (weight - 2) * 3
# if enc[district] == "03":
#     if weight <= 2:
#         result = 14
#     if weight > 2:
#         result = 14 + (weight - 2) * 3
# print(result)

# weight, district = input("请输入您的快递重量（单位：千克）和发货地区编号（01/02/03）").split(" ")
# weight = int(weight)
# price_table = {
#     "01":
#         {
#             "first_weight": 12,
#             "extra_weight": 2
#         },
#     "02":
#         {
#             "first_weight": 13,
#             "extra_weight": 3
#         },
#     "03":
#         {
#             "first_weight": 14,
#             "extra_weight": 3
#         },
# }
# if district in price_table:
#     first_weight = price_table[district]["first_weight"]
#     extra_weight = price_table[district]["extra_weight"]
#     if weight <= 2:
#         total_cost = first_weight
#     if weight > 2:
#         total_cost = first_weight + (weight - 2) * extra_weight
#     print(f"您需要支付：{total_cost:.2f}")
# else:
#     print("暂不支持您的区域！")
# N = int(input())
# sum = 0
# for e in range(1, N + 1):
#     sum += e
# print(sum)

# N = int(input())
# i = N
# factorial = 1
# while i > 0:
#     factorial = factorial * i
#     i = i - 1
# print(factorial)

# 猜数字
# target_num = random.randint(1, 100)
# attempts = 5
# while attempts > 0:
#     guess_num = int(input("请猜数字："))
#     if guess_num > target_num:
#         print("太大了！")
#         attempts -= 1
#     elif guess_num < target_num:
#         print("太小了！")
#         attempts -= 1
#     else:
#         print("猜对了！")
#         break
# print("正确数字是：", target_num)
# numbers = [1, 2, 3, 4]
# three_digit_numbers = []
#
# for i in range(4):
#     for j in range(4):
#         if i == j:
#             continue
#         for k in range(4):
#             if k == i or k == j:
#                 continue
#             number = numbers[i] * 100 + numbers[j] * 10 + numbers[k] * 1
#             three_digit_numbers.append(number)
# print(len(three_digit_numbers))
# print(three_digit_numbers)
